﻿namespace Zhp.Api.Attributes
{
    /// <summary>
    /// 防重复提交
    /// </summary>
    [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
    public class RepeatSubmitAttribute : Attribute
    {
        
        public int? Expire { get; set; }

        public RepeatSubmitAttribute()
        {
            
        }

        /// <summary>
        ///  单位：秒
        /// </summary>
        /// <param name="expire"></param>
        public RepeatSubmitAttribute(int expire)
        {
            Expire = expire;
        }
    }

    public enum RepeatSubmitEnum
    {
        None = 0,
        AutoExpire = 1,
        FixedExpire = 2
    }
}
